/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class ElectricShaver {
    static categoryCode = '010060013';

    static categoryName = '剃须机';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return ElectricShaver.categoryCode;
    }

    get categoryName() {
        return ElectricShaver.categoryName;
    }

    getDuration(params) {
        return command({
            method: 'getDuration',
            methodId: 'pgh07JHx',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getMode(params) {
        return command({
            method: 'getMode',
            methodId: 'p1vZON43',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getRemainTime(params) {
        return command({
            method: 'getRemainTime',
            methodId: 'phEqB2Fb',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSpeed(params) {
        return command({
            method: 'getSpeed',
            methodId: 'pDrhtT8G',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pGoxGSBV',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setDuration(params) {
        return command({
            method: 'setDuration',
            methodId: 'pZgRqLdS',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setMode(params) {
        return command({
            method: 'setMode',
            methodId: 'ppAXzdoZ',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSpeed(params) {
        return command({
            method: 'setSpeed',
            methodId: 'pUPQoZGL',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'peH39r9d',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default ElectricShaver;
